package com.eastfair.home.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.home.enumeration.BoothAcceptanceRecordAcceptanceTypeEnum;
import com.eastfair.home.enumeration.BoothAcceptanceRecordAcceptanceStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 展台验收记录
 * </p>
 *
 * @author linan
 * @since 2022-11-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="hc_booth_acceptance_record",autoResultMap = true)
@ApiModel(value = "BoothAcceptanceRecord", description = "展台验收记录")
@AllArgsConstructor
public class BoothAcceptanceRecord extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（应用状态）：1是；0否
     */
    @ApiModelProperty(value = "是否启用（应用状态）：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（应用状态）：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 验收类型 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}
     */
    @ApiModelProperty(value = "验收类型 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}")
    @TableField(value = "acceptance_type")
    @Excel(name = "验收类型 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}", replace = {"布展展台验收_ARRANGEMENT", "撤展展台验收_DISMANTLING",  "_null"})
    private BoothAcceptanceRecordAcceptanceTypeEnum acceptanceType;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会ID")
    private Long exhibitionManageId;

    /**
     * 主场ID
     */
    @ApiModelProperty(value = "主场ID")
    @TableField(value = "home_court_id")
    @Excel(name = "主场ID")
    private Long homeCourtId;

    /**
     * 展商ID
     */
    @ApiModelProperty(value = "展商ID")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商ID")
    private Long exhibitorId;

    /**
     * 展商名称
     */
    @ApiModelProperty(value = "展商名称")
    @Size(max = 100, message = "展商名称长度不能超过100")
    @TableField(value = "exhibitor_name", condition = LIKE)
    @Excel(name = "展商名称")
    private String exhibitorName;

    /**
     * 搭建商ID
     */
    @ApiModelProperty(value = "搭建商ID")
    @TableField(value = "builder_id")
    @Excel(name = "搭建商ID")
    private Long builderId;

    /**
     * 搭建商名称
     */
    @ApiModelProperty(value = "搭建商名称")
    @Size(max = 100, message = "搭建商名称长度不能超过100")
    @TableField(value = "builder_name", condition = LIKE)
    @Excel(name = "搭建商名称")
    private String builderName;

    /**
     * 展馆编码
     */
    @ApiModelProperty(value = "展馆编码")
    @Size(max = 64, message = "展馆编码长度不能超过64")
    @TableField(value = "space_code", condition = LIKE)
    @Excel(name = "展馆编码")
    private String spaceCode;

    /**
     * 展馆号
     */
    @ApiModelProperty(value = "展馆号")
    @Size(max = 100, message = "展馆号长度不能超过100")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展馆号")
    private String spaceName;

    /**
     * 展位编码
     */
    @ApiModelProperty(value = "展位编码")
    @Size(max = 64, message = "展位编码长度不能超过64")
    @TableField(value = "site_code", condition = LIKE)
    @Excel(name = "展位编码")
    private String siteCode;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 100, message = "展位号长度不能超过100")
    @TableField(value = "site_name", condition = LIKE)
    @Excel(name = "展位号")
    private String siteName;

    /**
     * 验收状态  #{UN_ACCEPTANCE:未验收;REQUESTED:已申请;PASS:验收通过;NOT_PASS:验收失败}
     */
    @ApiModelProperty(value = "验收状态  #{UN_ACCEPTANCE:未验收;REQUESTED:已申请;PASS:验收通过;NOT_PASS:验收失败}")
    @TableField(value = "acceptance_status")
    @Excel(name = "验收状态  #{UN_ACCEPTANCE:未验收;REQUESTED:已申请;PASS:验收通过;NOT_PASS:验收失败}", replace = {"未验收_UN_ACCEPTANCE", "已申请_REQUESTED", "验收通过_PASS", "验收失败_NOT_PASS",  "_null"})
    private BoothAcceptanceRecordAcceptanceStatusEnum acceptanceStatus;

    /**
     * 验收人
     */
    @ApiModelProperty(value = "验收人")
    @TableField(value = "acceptance_by")
    @Excel(name = "验收人")
    private Long acceptanceBy;

    /**
     * 验收人姓名
     */
    @ApiModelProperty(value = "验收人姓名")
    @Size(max = 100, message = "验收人姓名长度不能超过100")
    @TableField(value = "acceptance_name", condition = LIKE)
    @Excel(name = "验收人姓名")
    private String acceptanceName;

    /**
     * 验收人手机号
     */
    @ApiModelProperty(value = "验收人手机号")
    @Size(max = 100, message = "验收人手机号长度不能超过100")
    @TableField(value = "acceptance_mobile", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "验收人手机号")
    private String acceptanceMobile;

    /**
     * 验收时间
     */
    @ApiModelProperty(value = "验收时间")
    @TableField(value = "acceptance_time")
    @Excel(name = "验收时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime acceptanceTime;


    @Builder
    public BoothAcceptanceRecord(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    BoothAcceptanceRecordAcceptanceTypeEnum acceptanceType, Long exhibitionManageId, Long homeCourtId, Long exhibitorId, String exhibitorName, Long builderId, 
                    String builderName, String spaceCode, String spaceName, String siteCode, String siteName, BoothAcceptanceRecordAcceptanceStatusEnum acceptanceStatus, 
                    Long acceptanceBy, String acceptanceName, String acceptanceMobile, LocalDateTime acceptanceTime) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.acceptanceType = acceptanceType;
        this.exhibitionManageId = exhibitionManageId;
        this.homeCourtId = homeCourtId;
        this.exhibitorId = exhibitorId;
        this.exhibitorName = exhibitorName;
        this.builderId = builderId;
        this.builderName = builderName;
        this.spaceCode = spaceCode;
        this.spaceName = spaceName;
        this.siteCode = siteCode;
        this.siteName = siteName;
        this.acceptanceStatus = acceptanceStatus;
        this.acceptanceBy = acceptanceBy;
        this.acceptanceName = acceptanceName;
        this.acceptanceMobile = acceptanceMobile;
        this.acceptanceTime = acceptanceTime;
    }

}
